package com.bdqn;

import com.bdqn.pojo.SysUser;
import com.bdqn.service.SysUserService;
import com.bdqn.service.impl.SysUserServiceImpl;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Test
 *
 * @author LILIBO
 * @since 2024/6/25
 */
public class Test {

    // 引入Service层
    private static final SysUserService sysUserService = new SysUserServiceImpl();

    public static void main(String[] args) {
        SysUser sysUser = new SysUser();
        sysUser.setAccount("hongshuai");
        sysUser.setRealName("红帅好帅");
        sysUser.setRoleId(1L);
        sysUser.setCreatedUserId(1L);
        sysUser.setCreatedTime(SimpleDateFormat.getDateTimeInstance().format(new Date()));
        int isok = sysUserService.add(sysUser);
        if (isok == 1) {
            System.out.println("添加成功！");
        } else {
            System.out.println("添加失败！");
        }
    }

}
